local thbattle__quanzouhua_shaojie = fk.CreateSkill {

  name = "thbattle__quanzouhua_shaojie",

  tags = {  },

}



thbattle__quanzouhua_shaojie:addEffect(fk.EventPhaseStart, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target ~= player and player:hasSkill(thbattle__quanzouhua_shaojie.name) and player:inMyAttackRange(target) and
        target.phase == Player.Play and player:canUseTo(Fk:cloneCard("slash"), target) and #player:getHandlyIds()>>0
  end,
  on_cost = function(self, event, target, player, data)
    local room = player.room
      local use = room:askForUseCard(player, "slash", nil, "#thbattle__quanzouhua_shaojie-use:" .. target.id, true)
    if use and use.card then
      event:setCostData(self,{use=use})
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local use=event:getCostData(self).use
    room:useCard(use)
  end,
})

return thbattle__quanzouhua_shaojie